package cn.tedu.baking.mapper;

import cn.tedu.baking.pojo.dto.ContentManagementQueryDTO;
import cn.tedu.baking.pojo.entity.Content;
import cn.tedu.baking.pojo.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContentMapper {
    int insert(Content content);

    List<ContentManagementVO> selectForManagement(ContentManagementQueryDTO queryDTO);

    int deleteById(Long id);

    ContentUpdateVO selectForUpdateById(Long id);

    void update(Content content);

    String selectImgUrlById(Long id);

    List<ContentIndexVO> selectIndex(@Param("type") Integer type,@Param("categoryId") Long categoryId);

    ContentDetailVO selectDetailById(Integer id);

    List<ContentSimpleVO> selectOther(@Param("id")Integer id,@Param("userId") Long userId);

    int updateViewCountById(Integer id);

    List<ContentSimpleVO> selectHotList(Integer id);

    List<ContentIndexVO> listByType(Integer type);

    List<ContentIndexVO> selectByWd(String wd);

    List<ContentAdminVO> selectForAdmin();
}
